package models
{
	public class IE
	{
		public function IE(country:String, year:int, country_id:String, land_type:String, trade_type:String, amount:Number)
		{
			this.year = year;
			
			if (land_type == "CL") this.land_type = "Cropland";
			else if (land_type == "GL") this.land_type = "Grazing Land";
			else if (land_type == "FL") this.land_type = "Forest Land";
			else if (land_type == "FG") this.land_type = "Fishing Grounds";
			else if (land_type == "BL") this.land_type = "Built-up land";
			else if (land_type == "C") this.land_type = "Carbon Footprint";
			else if (land_type == "TOTAL") this.land_type = "Total";
			
			if (trade_type == "I") this.trade_type = "Imports";
			else if (trade_type == "E") this.trade_type = "Exports";
			
			//if (country_id == 1) this.per_capita = true; else this.per_capita = false;

			this.country_id = country_id;
			
			this.amount = amount;
			
			this.country = country;
		}
		
		public function toString():String
		{
			return "Year: " + year + "; Country ID: " + country_id + "; Land Type: " + land_type + "; Trade Type: " + trade_type + "; Amount: " + amount;
		}

		
		public var country:String;
		public var country_id:String;
		public var year:int;
		public var land_type:String;
		public var trade_type:String;
		public var amount:Number;
	}
}